package com.dyh.service.serviceImpl;
//引用area实体类
import com.dyh.po.area;
//引用areaDao层
import com.dyh.dao.areaDao;
//引用areaService层
import com.dyh.service.areaService;
//引用spring相关组件
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
//引用List数据结构
import java.util.List;

/**
 * 实现areaService服务层
 * @see com.dyh.service.areaService
 */
@Service("areaService")
@Transactional
public class areaServiceImpl implements areaService{
    /**
     * 使用自动注入
     */
    @Autowired
    areaDao areadao;

    /**
     * 查找所有行政区域
     * @return List
     */
    @Override
    public List<area> findAllArea() {
        return areadao.findAllArea();
    }

    public area findAreaById(String areaId){
        return areadao.findAreaById(areaId);
    }

    public int deleteArea(String areaId){
        return areadao.deleteArea(areaId);
    }
}
